import 'package:flutter/material.dart';
import 'package:study_flutter/yzhg/project/shop/model/YCatagoryBean.dart';

class ChildCategory with ChangeNotifier {
  List<BxMallSubDto> childCategoryList = [];

  BxMallSubDto item;

  getChildCategory(List<BxMallSubDto> list) {
    BxMallSubDto allItem = BxMallSubDto();
    allItem.mallCategoryId = (list.length > 0) ? list[0].mallCategoryId : "";
    allItem.mallSubId = "";
    allItem.mallSubName = "全部";
    allItem.comments = "";
    childCategoryList = [allItem];
    childCategoryList.addAll(list);
    notifyListeners();
  }

  /*点击二级分类  修改商品详情*/
  getGoodsDetailData(BxMallSubDto item) {
    this.item = item;
    //刷新数据
    notifyListeners();
  }
}
